package com.zrh.jsd.service.studydemo.pattern.observer_pattern;

import java.util.Observable;
import java.util.Observer;

// 学生：作为观察者，观察老师
public class Student implements Observer {
    private String name ;

    public Student() {
    }

    public Student(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(arg + name + "把手机藏起来了");
    }
}
